package com.zhb.lkd.mapper;

import com.zhb.lkd.pojos.entity.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author haibin
 * @since 2024-08-18
 */
public interface OrderMapper extends BaseMapper<Order> {
    /**
     * 销售额统计
     * @param start
     * @param end
     * @return
     */
    @Select("select sum(price) from tb_order where create_time  between #{start} and  #{end}")
    Long selectOrderAmount(@Param("start") LocalDateTime start,@Param("end") LocalDateTime end);
}
